Fix deploy preview workflow: permissions, keep_files, cleanup#10
Closed
Copilot wants to merge 2 commits into
Closed
Fix deploy preview workflow: permissions, keep_files, cleanup#10Copilot wants to merge 2 commits into
Copilot wants to merge 2 commits into
Conversation
…r main deploy, PR cleanup job PR #7 failed because the workflow only had `contents: write` permission but the PR comment step requires `pull-requests: write`. Additional fixes: - Add `keep_files: true` to main deploy so PR preview subdirectories are not deleted when main is deployed - Add `cleanup-preview` job to remove PR preview directories when PRs are closed/merged - Add `?trace=URL` auto-load parameter to trace_viewer.html - Add demo/index.html redirect for the deployed demo Co-authored-by: rcoh <492903+rcoh@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Investigate deploy preview functionality breakdown
Fix deploy preview workflow: permissions, keep_files, cleanup
Feb 27, 2026
Contributor
|
🔍 Trace Viewer Preview: https://dial9-rs.github.io/dial9-tokio-telemetry/pr/10/ |
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR #7's deploy preview workflow fails with 403 on the PR comment step because it only declares
contents: writebutactions/github-scriptneedspull-requests: write. Additionally, the main deploy would wipe PR preview subdirectories, and stale previews were never cleaned up.Changes
pull-requests: writeto workflow permissionskeep_files: trueto thepeaceiris/actions-gh-pagesstep for main, so deploying main doesn't nukepr/*/subdirectoriescleanup-previewjob triggers onpull_request: closedtogit rmthe PR's preview directory fromgh-pagestrace_viewer.html: Add?trace=URLquery parameter support for auto-loading traces (enables the demo redirect)demo/index.html: Meta-refresh redirect totrace_viewer.html?trace=demo.binWorkflow structure
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.